package com.mvc.finance.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.mvc.framework.model.CompositeKeyAuditableEntity;

@Entity(name = "B_FINANCE_PRIVILEGE")
@IdClass(FinancePrivilegePK.class)
public class FinancePrivilege extends CompositeKeyAuditableEntity {
	public static final int	TYPE_RECEIVEABLE	= 1;
	public static final int	TYPE_DUES	     = 2;

	@Id
	private Integer	        userId;
	@Id
	private Integer	        companyId;
	@Id
	private Integer	        type;

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}

class FinancePrivilegePK implements Serializable {
	private Integer	userId;
	private Integer	companyId;
	private Integer	type;

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}